package com.dg11185.nearshop.view;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import com.android.nearshop.R;

public class LoadingFragment extends Fragment{

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View v = inflater.inflate(R.layout.dialog_loading, null);// 得到加载view
        ImageView loadingImage = (ImageView) v
                .findViewById(R.id.image_v_loading);
        // 加载动画
        Animation hyperspaceJumpAnimation = AnimationUtils.loadAnimation(
                getActivity(), R.anim.loading_dialog_anim);
        // 使用ImageView显示动画
        loadingImage.startAnimation(hyperspaceJumpAnimation);
        return v;
    }
}
